1. Field of the Invention
The present invention relates to an interface circuit which is provided in an electronic device such as a digital camera and which meets USB (Universal Serial Bus) standard for connection to a host such as a personal computer (hereinafter, referred to as a “PC”) or a printer, for example.
2. Description of the Related Art
The USB standard is used for connection of a device such as a keyboard, a mouse, a printer or the like to a host such as a PC. The USB interface allows interfaces which are different for each device to be connected to a host such as a PC via the same connector. The USB interface is classified as having either a host function for controlling signal transmission/reception actively or a device function for playing a passive role.
FIGS. 3A and 3B are configuration diagrams showing examples of connections of hosts and devices, which are provided with interface circuits of a conventional USB standard. There are one USB interface for each device and one USB interface for each host.
In FIG. 3A, for example, an electronic equipment such as a digital camera or the like is caused to function as a device 10 and a host 20, such as a PC or the like is connected to the device via a USB cable 30. A controller for the USB interface is provided on a side of the host 20.
In FIG. 3B, for example, an electronic device such as a digital camera or the like. is caused to function as a host 10A and a device 20A such as a printer or the like is connected to the host 10A via a USB cable 30. A controller for the USB interface is provided on a side of the host 10A.
In FIG. 3A, the device 10 which is the electronic device is provided with a transceiver section 11 for performing transmission/reception of data. The transceiver section is connected to data terminals D+ and D− of a USB connector 15 via data lines DL+ and DL− for USB signal transmission. When the device 10 is intended for high speed data transfer, the data line DL+ is connected to a power source terminal VCC via a pull-up resistor 12. When the device 10 is intended for a low speed data transfer, the data line DL− is connected to the power source terminal VCC via a pull-up resistor 13 in place of the pull-up resistor 12. Also, a power supply section 14 is provided in the device 10 to receive source power supplied from the host 20 side via the cable 30. The source power received by the power supply section 14 is supplied to an internal circuit in the device 10. The power supply section 14 is connected to a power source terminal VCC of the connector 15 and a power source terminal GND on a ground side via power source lines PL+ and PL−. The connector 15 is connected to the host 20 such as a PC or the like via the cable 30.
Provided in a main body of the host 20 such as a PC is a transceiver section 21 for performing transmission/reception of data. The transceiver section 21 is connected to data terminals D+ and D− of a USB connector 25 via data lines DL+ and DL−. The data lines DL+ and DL− are connected to the power source terminal GND on the ground side via pull-down resistors 22 and 23. Also, provided in the main body of the host 20 is a power supply section 24 for supplying source power to the device 10. The power supply section 24 is connected to the power source terminals VCC and GND of a connector 25 via power source lines PL+ and PL−. For example, a mouse 26-1 for signal input, a keyboard 26-2 for signal input, a printer 26-3 for output and the like are connected to the main body of the host 20.
In the configuration shown in FIG. 3A, for example, when data of an image photographed by the device 10 side or the like is fed to the host 20, power supplied from the power supply section 24 on the host 20 side is received in the power supply section 14 of the device 10 via the cable 30. The internal circuit in the device 10 operates on the basis of the power received, the image data or the like is output from the transceiver section 11, and it is transmitted to the transceiver 21 on the host 20 side via the cable 30, so that the image data or the like is displayed on a display on the host 20 side. Alternatively, the image data or the like may be printed by the printer 26-3.
On the contrary, in the configuration shown in FIG. 3B, for example, the electronic device is caused to function as the host 10A and the printer or the like is caused to function as the device 20A. The host 10A is provided with a transceiver section 11 for performing transmission/reception of data, or transmitting and receiving data, a power supply section 14A for supplying source power to the device 20A, and the like. The transceiver section 11 is connected to data terminals D+ and D− of the connector via data lines DL+ and DL−. The data lines DL+ and DL− are connected to a power source terminal GND on the ground side via pull-down terminals D+ and D−. The power supply section 14A is connected to a power source terminal VCC of the connector 15 and the power source terminal GND on the ground side. The connector 15 is connected to the device 20A such as a printer or the like via the cable 30.
The device 20A is provided with a transceiver section 21 for performing transmission/reception of data, a power supply section 24A for receiving source power supplied from the host 10A, and the like. The transceiver section 21 is connected to data terminals D+ and D− of a connector 25 via data lines DL+ and DL−. When the device 20A is intended for high speed data transfer, the data line DL+ is connected to the power source terminal VCC via a pull-up resistor 27. When the device 20A is intended for low speed data transfer, the data line PL− is connected to the power source terminal VCC via a pull-up resistor 28 in place of the pull-up resistor 27. The power source section 24A is connected to the power source terminal VCC of the connector 25 and the power source terminal GND on the ground side.
In the configuration shown in FIG. 3B, for example, when data of an image photographed by the host 10A of the electronic device or the like is transferred to the device 20A of a printer of the like, source power is output from the power supply section 14A on the host 10 side, and it is fed to the power supply section 24A on the device 20A via the cable 30. The source power received by the power supply section 24A is fed to an internal circuit of the device 20A so that the device 20A is put in an operable state. When the data of an image or the like is output from the transceiver section 11 on the host 10A side, it is transferred to the transceiver section 21 on the device 20A side via the cable 30. The data of an image or the like transferred is printed by the device 20A or processed by a certain device.
As shown in FIGS. 3A and 3B, the USB interface is clearly classified as having either a host function for controlling transmission/reception of a signal in an active manner or a device function for playing a passive role. However, in an electronic device such as a digital camera, for example, an interface circuit having both the host function and the device function is desired for user convenience.
In view of the above, integrating the host function and the device function on one interface circuit and having the functions share the USB signals (D+, D−) has been considered.
FIG. 4 is a configuration diagram of an interface circuit having a host function and a device function, which has been configured using a conventional art, where components or parts common to the components or parts shown in FIGS. 3A and 3B are denoted by common reference numerals.
In FIG. 4, an electronic device 10B such as a digital camera, for example, is caused to have a host function and a device function, and the electronic device 10B is connected to a host 20 such as a PC via a USB cable 30.
The electronic device 10B is provided with a host transceiver section 11A which performs transmission/reception of data, a device transceiver section 11B which performs transmission/reception of data and a power supply means 14B having a function for switching between a power supplying mode and a power receiving mode.
The host transceiver section 11A has a host function circuit 11A-1 which performs transmission/reception of data for the host function, and input and output terminals of the host function circuit 11A-1 are connected to data lines DL+ and DL−, and data terminals D+ and D− of a connector 15 via a USB buffer 11A-2. The USB buffer 11A-2 is configured by an output differential buffer 11A-2a which differentially amplifies data output from the host function circuit 11A-1 to output this amplified data to data lines DL+ and DL−, and an input differential buffer 11A-2b which differentially amplifies the data fed from the data lines DL+ and DL− to input the amplified data into the host function circuit 11A-1.
The device transceiver section 11B has a device function circuit 11B-1 which performs transmission/reception of data for the device function, and input and output terminals of the device function circuit are connected to data lines DL+ and DL−, and data terminals D+ and D− of the connector 15 via a USB buffer 11B-2. The USB buffer 11B-2 is configured by an output differential buffer 11B-2a which differentially amplifies data output from the device function circuit 11B-2 to output this amplified data to data lines DL+ and DL− and an input differential buffer 11B-2b. The input differential buffer 11B-2b differentially amplifies data output from the data lines DL+ and DL− to input the amplified into the device function circuit 11B-1.
The data lines DL+ and DL− are connected to power source terminals GND on the ground side via a pull-down resistor 16 and switching means 18-1. The data lines DL− and DL+ are connected to the power source terminals on the ground side via a pull-down resistor 17 and switching means 18-2. The switching means 18-1 and 18-2 have functions which turn ON according to a pull-down enable signal PDE for host to connect the pull-down resistors 16 and 17 to the power source terminals GND. When the electronic device 11B is intended for a high speed data transfer, for example, the data lines DL+ and DL− are connected to the power source terminals VCC via a pull-up resistor 12 for high speed data transfer and switching means 18-3. The switching means 18-3 has a function which turns ON according to a pull-up enable signal PUE for device to connect the pull-up resistor 12 to the power source terminal VCC.
Power supply means 14B is connected to the power source terminals VCC and GND of the connector via power supply lines PL+ and PL−. The power supply means 14B has a source power receiving/supplying switching function which receives source power fed from the host 20 via the cable 30 when the electronic device 10B is caused to have the device function and which outputs source power to supply it to the electronic device via the cable 30 when the device is caused to have the host function.
When a USB interface is performed in a state where a USB signal is shared, one of the host function and the device function of the electronic device 10B becomes unused. In general, each of the transceiver sections 11A and 11B is configured such that it waits in an input mode when unused. For example, when the device function of the electronic device 10B is employed, the host transceiver section 11A waits in an input mode under control of control means provided in the electronic device 10B, the switching means 18-1 and 18-2 are turned OFF according to the pull-down enable signal PDE, and the switching means 18-3 is turned OFF according to the pull-up enable signal PUE, and the power supply means 14B is switched to a power receiving mode.
Source power supplied from the power source section 24 on the host 20 side is received in the power supply means 14B on the electronic device 10B side via the cable 30 to be supplied to an internal circuit within the electronic device 10B. Like the case shown in FIG. 3B, when data is output from the device transceiver section 11B, it is sent to the transceiver section 21 on the host 20 side via the cable, so that the data sent may be displayed on a display or printed by a printer 26-3.
As shown in FIGS. 3A and 3B, the USB buffers 11A-2 and 11B-2 which perform a USB signal are designed assuming a one to one connection such as connection of the device 10 and the host 20, or connection of the host 10A and the device 20A. For this reason, when integration is conducted on an interface circuit, it is necessary to re-design the USB buffers 11A-2 and 11B-2 such that electrical characteristics of the USB standards can be met in a state where a USB signal is shared.
When a USB interface is implemented in the state sharing a USB signal, each of the USB buffers 11A-2 and 11B-2 is configured such that it waits in an input mode when unused. For example, when the electronic device 10B is caused to function as a device, the host USB buffer 11A-2 waits in an input mode. For this reason, for example, when the electronic device 10B has been connected to the host 20, the USB buffer which drives the USB cable 30 within the transceiver section 21 on the host side must drive loads corresponding to the two USB buffers 11A-2 and 11B-2 on the electronic device 10B side. In consideration of a load of the substrate wiring packaged with the interface circuit within the electronic device 10B, it is not easy to develop a sharable interface circuit within the electronic device 10B, which meets the electrical characteristics of the USB standards. Particularly, when the electronic device 10B is a small device such as a portable device, an interface circuit mounted on the small device is required to have ease of switching between the host function and the device function, a relatively simple circuit configuration and a small-size. However, it has been difficult to provide an interface circuit meeting these requirements.